import request from '@/utils/request'

export function addHoliday(row) {
  return request({
    url: '/teaching/teaching_plan/holiday',
    method: 'post',
    data: row
  })
}
export function addWorkday(row) {
  return request({
    url: '/teaching/teaching_plan/workday',
    method: 'post',
    data: row
  })
}
export function previewTeachingPlan(query) {
  return request({
    url: '/teaching/teaching_plan/list/preview',
    method: 'post',
    data: query
  })
}
export function listAllPlan(query) {
  return request({
    url: '/teaching/teaching_plan/list/all',
    method: 'get',
    params: query
  })
}
// 查询教学计划(课表)列表
export function listTeaching_plan(query) {
  return request({
    url: '/teaching/teaching_plan/list',
    method: 'get',
    params: query
  })
}

// 查询教学计划(课表)详细
export function getTeaching_plan(id) {
  return request({
    url: '/teaching/teaching_plan/' + id,
    method: 'get'
  })
}

// 新增教学计划(课表)
export function addTeaching_plan(data) {
  return request({
    url: '/teaching/teaching_plan',
    method: 'post',
    data: data
  })
}

// 修改教学计划(课表)
export function updateTeaching_plan(data) {
  return request({
    url: '/teaching/teaching_plan',
    method: 'put',
    data: data
  })
}

// 删除教学计划(课表)
export function delTeaching_plan(id) {
  return request({
    url: '/teaching/teaching_plan/' + id,
    method: 'delete'
  })
}
